package com.gator.desig_mode.obsever;


/**
 * @author 何章怀晓 hezhanghuaixiao
 * @version V1.0
 * @desc
 */
public class Client {

  public static void main(String[] args) {

    WeatherSubject weatherSubject = WeatherSubject.getWeaObj();
    //添加观察者
    weatherSubject.observerRegister(new Baidu());
    weatherSubject.observerRegister(new Xilang());

    //天气有信息的信息
    Info info = new Info(20, 30);
    weatherSubject.setInfo(info);

    weatherSubject.observerNotify();
  }

}
